@use '@scss/common' as *;

.project {
  aspect-ratio: 1/1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--base) * 1.5);
  position: relative;
  text-decoration: none;
  border-bottom: 1px solid var(--theme-border-color);
  border-right: 1px solid var(--theme-border-color);

  &::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--theme-text);
    transition: width 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  }

  &:hover,
  &:focus {
    .scanlines {
      opacity: 1;
    }

    .arrow {
      opacity: 1;
      transform: translate(0, 0);
    }

    &::before {
      width: 100%;
    }
  }

  @include small-break {
    aspect-ratio: unset;
    gap: 2rem;
  }
}

.scanlines {
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: -1;
}

.titleWrapper {
  display: flex;
  flex-direction: column;
  gap: calc(var(--base) / 2);
}

.title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.arrow {
  opacity: 0;
  transform: translate(-50%, 50%);
  transition:
    opacity 0.3s cubic-bezier(0.165, 0.84, 0.44, 1),
    transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.projectName {
  @include h5;
  & {
    margin: 0 calc(var(--base) / 2) 0 0;
  }
}

.teamName {
  margin: 0;
  @include small;
  & {
    color: var(--theme-elevation-750);
  }
}

.details {
  display: flex;
  flex-direction: column;
  gap: calc(var(--base) / 2);
}

.githubIcon {
  width: var(--base);
  height: var(--base);
}

.iconText {
  display: flex;
  gap: 0.5rem;
  align-items: center;

  span {
    @include small;
    & {
      margin: 0;
      color: var(--theme-elevation-500);
    }
  }
}
